package com.gitee.wsl.ext.map

import com.gitee.wsl.base.AnyMap
import com.gitee.wsl.base.AnyMutableMap

/**
 * Try to replace the function body with just:
 *
 * ```kotlin
 *putAll(map)
 * ```
 *
 * If it works then yay we don't need this function anymore, but right now I'm getting:
 *
 * Type mismatch
 *
 * Required: Map<Nothing, Nothing>
 *
 * Found:    Map<*, *>
 */
fun AnyMutableMap.hackPutAll(map: AnyMap) {
    @Suppress("UNCHECKED_CAST")
    (this as MutableMap<Any?, Any?>).putAll(map)
}